"ui";
ui.layout(
    <frame>
        <vertical bg="file://res/樱花瓶.jpeg">
            <horizontal>
                <button id="ovalpetal" textColor="#feeeed" text = "椭圆花瓣" backgroundTint="#00ff6699">
                </button>
                <button id="sakura" textColor="#feeeed" text = "樱花花瓣" backgroundTint="#00feeeed">
                </button>
                <button id="tiezhi" textColor="#feeeed" text = "贴纸" backgroundTint="#00feeeed"/>
                <button id="esc" textColor="#feeeed" text = "终止" backgroundTint="#00000000">
                </button>
            </horizontal>
            <horizontal>
                <button id="wu" textColor="#feeeed" text = "枕头悟" backgroundTint="#00feeeed"/>
                <button id="beiwu" textColor="#feeeed" text = "被子悟" backgroundTint="#00feeeed"/>
                <button id="shuji" textColor="#feeeed" text = "藤原千花" backgroundTint="#00feeeed"/>
                <button id="nvdi" textColor="#feeeed" text = "女帝" backgroundTint="#00feeeed"/>
            </horizontal>
            <horizontal>
                <button id="zhao" textColor="#feeeed" text = "花千骨" backgroundTint="#00feeeed"/>
                <button id="hu" textColor="#feeeed" text = "梅长苏" backgroundTint="#00feeeed"/>
            </horizontal>
            <horizontal>
                <input id="num" text="漂浮数量" textColor="#feeeed" />
                <button text="提交" id="submit" textColor="#feeeed" backgroundTint="#00feeeed"/>
            </horizontal>
        </vertical>
    </frame>
)
storage = storages.create("/number")
ui.submit.on("click", () => {
    storage.put("number", parseInt(ui.num.getText()));;
})
ui.statusBarColor("#ff000000")
ui.num.on("long_click", () => {
    ui.num.setText("1");
});
ui.ovalpetal.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/椭圆花瓣.js");
})
ui.sakura.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/桃心花瓣.js");
})
ui.tiezhi.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/贴纸.js");
})
ui.wu.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/五条悟.js");
})
ui.beiwu.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/被子悟.js");
})
ui.nvdi.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/女帝.js");
})
ui.zhao.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/花千骨.js");
})
ui.hu.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/梅长苏.js");
})
ui.shuji.on("click", () => {
    engines.execScriptFile("./res/画布花瓣/藤原千花.js");
})
ui.esc.on("click", () => {
    engines.stopAll()
    exit();
})